#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QDragEnterEvent> // Make sure you include the necessary headers
#include <QMimeData>
#include <QMainWindow>
#include<QString>
#include<QMimeDatabase>
#include<QImageReader>
#include<QFileInfo>
#include<QDir>

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
protected:
    void dragEnterEvent(QDragEnterEvent *event) override; // Declaration of dragEnterEvent
    void  dropEvent(QDropEvent *event)override;
private slots:
    void on_btn_clear_clicked(bool checked);

    void on_pushButton_2_clicked();

    void   addImagesRecursively(const QString &dirPath);
    int   compress(int argc, char **argv);
private:
    Ui::MainWindow *ui;
      QSet<QString> addedImages; // 集合用于存储已添加的图片路径

};
#endif // MAINWINDOW_H
